<!DOCTYPE html>
<html>
<head>
	<title></title>
	<style type="text/css">
		svg{border: 1px solid #333;}
	</style>
	<script type="text/javascript" src="./js/d3.v3.min.js"></script>
	<script type="text/javascript">
		window.onload=function(){
			//select 选择第1个元素
			var svg=d3.select("body").append("svg")
				.attr("width",600)
				.attr("height",400)

			//绘制矩形
			svg.append("rect")
				.attr("x",100)
				.attr("y",100)
				.attr("width",100)
				.attr("height",30)
				.attr("fill","red")
				.attr("stroke","blue")

		}
	</script>
</head>
<body>

</body>
</html>